package com.minimalist.common.entity.basic.vo.config;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author 11987
 */
@Schema(name = "参数配置查询实体")
public class ConfigQueryVO extends PageReq implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "configName", description = "参数名称", type = "string")
    private String configName;

    @Schema(name = "configKey", description = "参数键名", type = "string")
    private String configKey;

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "参数配置状态", type = "integer")
    private Integer status;

    public String getConfigName() {
        return configName;
    }

    public void setConfigName(String configName) {
        this.configName = configName;
    }

    public String getConfigKey() {
        return configKey;
    }

    public void setConfigKey(String configKey) {
        this.configKey = configKey;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ConfigQueryVO that = (ConfigQueryVO) o;
        return java.util.Objects.equals(configName, that.configName) &&
               java.util.Objects.equals(configKey, that.configKey) &&
               java.util.Objects.equals(status, that.status);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), configName, configKey, status);
    }

    @Override
    public String toString() {
        return "ConfigQueryVO{" +
               "configName='" + configName + '\'' +
               ", configKey='" + configKey + '\'' +
               ", status=" + status +
               "} " + super.toString();
    }

}
